package com.huluobo.lib_base.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.huluobo.lib_base.entity.VideoEntityItem

/**
 *  Created by LC on 2025/8/5.
 */
@Dao
interface VideoDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertVideoInfo(videoEntityItem: VideoEntityItem): Long

    @Delete
    fun deleteVideoInfo(videoEntityItem: VideoEntityItem)

    @Query("select * from video_info where id=:videoId")
    fun queryVideoInfoById(videoId: Int): VideoEntityItem

    @Query("select * from video_info")
    fun queryAllVideoInfo():List<VideoEntityItem>
}